﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductBox1.ascx.cs" Inherits="CS424_9pts.Modules.ProductBox1" %>
<div class="product-item">
    <h2 class="product-title">
        <asp:HyperLink ID="hlProduct" runat="server" Text='<%#Eval("ModelName") %>' NavigateUrl="#" />
    </h2>
    <div class="picture">
        <asp:HyperLink ID="hlImageLink" runat="server" />
    </div>
    <div class="description">
        <asp:Literal runat="server" ID="lShortDescription" Text='<%#Eval("Description") %>'></asp:Literal>
    </div>
    <div class="add-info">
        <div class="prices">
            <asp:Label ID="lblOldPrice" runat="server" CssClass="oldproductPrice" Text='<%#("Price") %>' />
            <br />
            <asp:Label ID="lblPrice" runat="server" CssClass="productPrice" Text='<%#("Price") %>'/>
        </div>
        <div class="buttons">
            <asp:Button runat="server" ID="btnProductDetails"
                Text="Product Detail" ValidationGroup="ProductDetails"
                CssClass="productgridproductdetailbutton" /><br />
            <asp:Button runat="server" ID="btnAddToCart" Text="Add To Cart"
                ValidationGroup="ProductDetails" CssClass="productgridaddtocartbutton" />
        </div>
    </div>
</div>
<asp:SqlDataSource ID="CarCategory" runat="server" 
    ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>" 
    
    SelectCommand="SELECT CarModel.ModelID, CarModel.BrandID, CarModel.Engine, CarModel.Fuel, CarModel.Brake, CarModel.Transmission, CarModel.SpectableID, CarModel.Price as Price, CarModel.ModelName, CarModel.ImageName, CarModelDetail.Description as Description FROM CarModel INNER JOIN CarModelDetail ON CarModel.ModelID = CarModelDetail.ModelID WHERE (CarModel.BrandID = @BrandID)">
    <SelectParameters>
        <asp:QueryStringParameter Name="BrandID" QueryStringField="BrandID" 
            Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>

